package com.jeesite.modules.auth.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 用户信息Entity
 * @author JeeSite
 * @version 2024-01-01
 */
@Table(name="users", alias="u", label="用户信息", columns={
    @Column(name="id", attrName="id", label="用户ID", isPK=true),
    @Column(name="username", attrName="username", label="用户名", queryType=QueryType.LIKE),
    @Column(name="password", attrName="password", label="密码"),
    @Column(name="nickname", attrName="nickname", label="昵称", queryType=QueryType.LIKE),
    @Column(name="avatar", attrName="avatar", label="头像"),
    @Column(name="role", attrName="role", label="角色"),
    @Column(name="status", attrName="status", label="状态"),
    @Column(name="created_at", attrName="createdAt", label="创建时间"),
    @Column(name="updated_at", attrName="updatedAt", label="更新时间")
}, orderBy="u.id DESC"
)
public class AuthUser extends DataEntity<AuthUser> {

    private static final long serialVersionUID = 1L;
    private String id;                // 用户ID
    private String username;        // 用户名
    private String password;        // 密码
    private String nickname;        // 昵称
    private String avatar;          // 头像
    private String role;            // 角色
    private String status;          // 状态
    private java.util.Date createdAt; // 创建时间
    private java.util.Date updatedAt; // 更新时间

    public AuthUser() {
        this(null);
    }

    public AuthUser(String id) {
        super(id);
    }

    // Getter and Setter methods
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public java.util.Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(java.util.Date createdAt) {
        this.createdAt = createdAt;
    }

    public java.util.Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(java.util.Date updatedAt) {
        this.updatedAt = updatedAt;
    }
}